<div class="box box-default">
    <div class="box-header with-border">
        <h3 class="box-title">查询条件</h3>
    </div>
    <div class="box-body">
        <form method="post" class="form-horizontal" id='designs_from'>
            <div class="form-group">
                <div class="col-sm-3">
                    <input type="text" class="form-control" placeholder="标题" name="title" value="{$search.title|default=''}">
                </div>
                <div class="col-sm-2">
                    <div class="input-group">
                        <div class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </div>
                        <input type="text" class="form-control datepicker" data-inputmask="'alias': 'yyyy-mm-dd'" placeholder="发布时间" name="add_time" value="{$search.add_time|default=''}">
                    </div>
                </div>    
                <div class="col-sm-2">
                    {:formSelect('type',$type,isset($search['type'])?$search['type']:'','风格')}
                </div>
                <div class="col-sm-3">
                    <input type="submit" class="btn btn-primary" value="搜索" />
                    <input type="button" class="btn btn-default"  onclick="fromReset('designs_from');$('#designs_from').submit();" value="重置" />
                </div>

            </div>
        </form>
    </div>
    <!-- /.box-body -->
</div>
<div class="box box-info">
    <div class="box-header with-border">
        <h3 class="box-title">设计图列表</h3>

        <div class="box-tools pull-right">
            <a href="{:url('contentdesigns/addDesigns')}" class="btn btn-sm btn-info btn-flat pull-left" ><i class="fa fa-fw fa-user-plus"></i> 新增设计图</a>
        </div>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <div class="table-responsive list-content">
            <table class="table no-margin">
                <thead>
                    <tr>
                        <th>排序</th>
                        <th>标题</th>
                        <th>风格</th>
                        <th>添加时间</th>
                        <th>更新时间</th>
                        <th>状态</th>
                        <th>管理操作</th>
                    </tr>
                </thead>
                <tbody>
                    {volist name="list" id="data"}
                    <tr>
                        <td width='7%'><input type='number' class='form-control list_order' data-id='{$data.id}' value='{$data.list_order}'  /></td>
                        <td>{$data.title} {if($data['thumb'])}<i class="fa fa-fw fa-file-image-o text-blue" onclick='previewAdminFile(0,"{$data.thumb}")'></i>{/if}</td>
                        <td>{:typeStr($data['type'],$type)}</td>
                        <td>{:date('Y-m-d',$data['created_at'])}</td>
                        <td>{$data.updatet_at}</td>
                        <td>{$contentStatus[$data['display']]}</td>
                        <td>
                            <a href="{:url('contentdesigns/editDesigns',['id'=>$data['id']])}" class="btn btn-link" >修改</a>
                            |
                            <a href="#" class="btn btn-link" onclick='confirmDelDefault("{:url("contentdesigns/delDesigns",["id"=>$data["id"]])}", "删除操作不能恢复，请谨慎选择")'>删除</a>
                        </td>
                    </tr>
                    {/volist}
                    <tr>
                        <td width='7%'>
                            <button class="btn btn-info" onclick='setOrder("{$setOrderUrl}")'>排序</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- /.table-responsive -->
    </div>
    <!-- /.box-body -->
    <div class="box-footer text-right">
        {$list->render()}
    </div>
</div>
